package com.jd.finance.core.service;

import com.jd.finance.core.pojo.entity.Photo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jd.finance.result.BaseResult;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author LiQingBo
 * @since 2022-05-19
 */
public interface PhotoService extends IService<Photo> {

    /**
     * 查询广告位图片
     * @return
     */
    BaseResult getAdvertisePhoto();
    /**
     * 查询轮播图图片
     * @return
     */
    BaseResult getBanner();

    /**
     * 查询所有banner图
     * @return
     */
    BaseResult getAllBannerPhoto();

    /**
     * 添加banner图
     * @param uid
     * @param photoPath
     * @param photoUrl
     * @param request
     * @return
     */
    BaseResult insertBannerPhoto(@Param("uid") Integer uid, @Param("photoPath") String photoPath, @Param("photoUrl") String photoUrl, @Param("request") HttpServletRequest request);

    /**
     * 删除banner图
     * @param uid
     * @param bannerId
     * @param request
     * @return
     */
    BaseResult deleteBannerPhoto(@Param("uid") Integer uid, @Param("bannerId") Integer bannerId, @Param("request") HttpServletRequest request);

    /**
     * 修改banner排序序号
     * @param uid
     * @param photoId
     * @param bannerNumber
     * @param request
     * @return
     */
    BaseResult updateBannerSeq(@Param("uid") Integer uid, Integer photoId, @Param("bannerNumber") Integer bannerNumber, @Param("request") HttpServletRequest request);

    /**
     * 更新腰线图片路径
     * @param uid
     * @param photoId
     * @param url
     * @param request
     * @return
     */
    BaseResult updateLineSrc(@Param("uid") Integer uid, @Param("photoId") Integer photoId, @Param("url") String url, @Param("request") HttpServletRequest request);

}
